package drds.binlog.event;

import drds.binlog.LogByteBlock;
import drds.binlog.LogEvent;

/**
 * Execute_load_log_event.
 */
public final class ExecuteLoadLogEvent extends LogEvent
{

    /* EL = "Execute Load" */
    public static final int EL_FILE_ID_OFFSET = 0;
    private final long fileId;

    public ExecuteLoadLogEvent(LogHeader logHeader, LogByteBlock logByteBlock, FormatDescriptionLogEvent formatDescriptionLogEvent)
    {
        super(logHeader);

        final int commonHeaderLength = formatDescriptionLogEvent.commonHeaderLength;
        logByteBlock.index(commonHeaderLength + EL_FILE_ID_OFFSET);
        fileId = logByteBlock.getUint32BasedOnIndex(); // EL_FILE_ID_OFFSET
    }

    public final long getFileId()
    {
        return fileId;
    }
}
